all:main  testkcpclient testkcpserver 

home_dir=../..

dependence_kcp=${home_dir}/kcp/Control.hpp ${home_dir}/kcp/Kcp.hpp ${home_dir}/kcp/KcpHdr.hpp
dependence_transport=${home_dir}/transport/transport.hpp ${home_dir}/transport/transport_udp.hpp ${home_dir}/transport/transport_kcp.hpp
dependenc_util=${home_dir}/util/datatypes.hpp ${home_dir}/util/header.hpp ${home_dir}/util/io.hpp ${home_dir}/util/poll_manager.hpp ${home_dir}/util/poll_set.hpp ${home_dir}/util/util.hpp ${home_dir}/util/ThreadPool.hpp ${home_dir}/util/Trace.hpp ${home_dir}/util/UdpSocket.hpp
dependence=${dependence_kcp} ${dependenc_util} ${dependence_transport}

lib=-lpthread -lboost_system -lboost_thread



 
main:main.cpp ${dependence}
	g++ -std=c++17 -g -o main main.cpp ${lib}


testkcpclient:testkcpclient.cpp ${dependence}
	g++ -std=c++17 -g -o testkcpclient testkcpclient.cpp ${lib} 

testkcpserver:testkcpserver.cpp ${dependence}
	g++ -std=c++17 -g -o testkcpserver testkcpserver.cpp ${lib}


clean:
	rm -f main testkcpclient testkcpserver 
